import Vue from 'vue'
import VueRouter from 'vue-router'
import Manage from '../views/Mannage.vue'
import 'resize-observer-polyfill';
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '首页',
    component: Manage,
    redirect:'home',
    children:[
      {
        path: 'user',
        name: '用户管理',
        component: () => import('../components/ShowMain/User.vue')
      },
      {
        path: 'home',
        name: '首页',
        component: () => import('../components/ShowMain/Home.vue')
      },
      {
        path: 'file',
        name: '文件',
        component: () => import('../components/ShowMain/File.vue')
      },
      {
        path: 'map',
        name: '地图',
        component: () => import('../components/ShowMain/Map.vue')
      },
      {
        path: 'person',
        name: '个人',
        component: () => import('../components/ShowMain/Person.vue')
      },
      {
        path: 'role',
        name: '权限',
        component: () => import('../components/ShowMain/Role.vue')
      },
      {
        path: 'menu',
        name: '菜单',
        component: () => import('../components/ShowMain/Menu.vue')
      }
    ]
  },
  {
    path:'/login',
    name:"登录",
    component:()=>import('../views/Login.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
